package com.xncoding.pos;

import com.xncoding.pos.controller.webfluxTest.PersonHandler;
import com.xncoding.pos.controller.webfluxTest.PersonRouter;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.xncoding.pos.feign")
//使用此注解可代替dao里的@Mapper
@MapperScan(basePackages = {"com.xncoding.pos.dao"})
public class Application {

    //    启动命令 nuhop java -jar app.jar --spring.profiles.active=dev  >catalina.out 2>&1 &

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(Application.class, args);

        PersonRouter server = new PersonRouter(new PersonHandler());
        server.createReactorServer();
    }


}
